<include file="__THEME__/header" />
<script type="text/javascript" src="../Public/js/district.js" ></script>
<script type="text/javascript" src="../Public/js/jquery.validator.reg.js"></script>
<script type="text/javascript" src="../Public/js/jquery.corners.min.js"></script>
<script type="text/javascript" src="../Public/js/register.js" ></script>
<!-- content -->
	<section class="form_title">
		<div class="intro"><h2>完善个人资料</h2><h3>以寻找你身边的小伙伴</h3> </div>
		<div class="info">
			<em class="icon icon_2"></em>
			<p>填写你的地址，性别，年龄，寻找和你同一个小区的小伙伴
记录你的兴趣，你的困惑，哎呀小助手给你最佳的答案，最好的资料</p>
		</div>
	</section>

	<section class="form_content">
		<form class="form-horizontal validate" action="{:U('home/Public/userinfo')}" method="post" name="reg">
			<fieldset>
	         <legend><span class="important">(默认公开信息)</span> 输入以下选项为了自动搜索你身边的小伙伴</legend>
	         <em class="top_line"></em>
	         <div class="content">
		          <div class="control-group">
		            <label class="control-label" for="input01">* 居住地</label>
		            <div class="controls">
		               {:W('Area', array('location' => $userInfo['location']))}
		            </div>
		          </div>
		          <div class="control-group">
		            <label class="control-label" for="input01">* 小区/村镇地址</label>
		            <div class="controls">
		              <input type="text" class="input-xlarge district" require="true" datatype="limit" min="2" name="address" value="{$userInfo.profile.address}" msg="输入你所在的社区或村镇信息" />
		              <div id="help_address" class="help"> <p>提供小区信息以找到你身边的伙伴</p></div>
		              <div id="error_address" class="error_tips" style="display:none;"></div>
		            </div>
		          </div>

		          <div class="control-group">
		            <label class="control-label" for="input01">* 宝宝性别</label>
		            <div class="controls">
		              <label class="multiple_input sex"><input type="radio" name="sex"  value="0" <eq name="userInfo.sex" value="0">checked='true'</eq>/>男</label>
		              <label class="multiple_input sex"><input type="radio" name="sex"  value="1" <eq name="userInfo.sex" value="1">checked='true'</eq>/>女</label>
		            </div>
		          </div>
	          </div>
	          <em class="bottom_line"></em>
	        </fieldset>

	        <fieldset>
	         <legend><span class="important">(默认非公开信息)</span> 输入以下选项为了自动搜索你身边的小伙伴</legend>
	         <em class="top_line"></em>
	         <div class="content">
		          <div class="control-group">
		            <label class="control-label" for="input01">生日</label>
		            <div class="controls">
		              <input type="text" class="input-xlarge date_selector"  require="false" name="birthday"  datatype="date"  msg="请输入正确的生日" value="{$userProfile['intro']['birthday']}" readonly/>
		              <div class="help"> <p>找你同龄的小伙伴</p></div>
		            </div>
		          </div>

		          <div class="control-group">
		            <label class="control-label" for="input01">血型</label>
		            <div class="controls">
		               <select name="blood_type" >
		               	<option value="AB" <eq name="userProfile['intro']['blood_type']" value="AB">selected</eq> >AB</option>
		               	<option value="A" <eq name="userProfile['intro']['blood_type']" value="A">selected</eq>>A</option>
		               	<option value="B" <eq name="userProfile['intro']['blood_type']" value="B">selected</eq>>B</option>
		               	<option value="o" <eq name="userProfile['intro']['blood_type']" value="o">selected</eq>>o</option>
		               </select>
		               <div class="help"> <p>找你性格差不多的小伙伴</p></div>
		            </div>
		          </div>

		          <div class="control-group">
		            <label class="control-label" for="input01">体重(kg)</label>
		            <div class="controls">
		              <input type="text" class="input-xlarge" name="weight" value="{$userProfile['intro']['weight']}" require="false" datatype="range"  min="2" msg="体重不能低于2KG" />
		              <div id="help_weight" class="help"> <p>根据体重来选择符合你的营养信息</p></div>
		              <div id="error_weight" class="error_tips" style="display:none;"></div>
		            </div>
		          </div>

		          <div class="control-group">
		            <label class="control-label" for="input01">身高(cm)</label>
		            <div class="controls">
		              <input type="text" class="input-xlarge" name="height" value="{$userProfile['intro']['height']}" require="false" datatype="range"  min="30" msg="身高不能低于30CM" />
		              <div id="help_height" class="help"> <p>根据身高给你各阶段的营养建议</p></div>
                      <div id="error_height" class="error_tips" style="display:none;"></div>
		            </div>
		          </div>

		          <div class="control-group">
		            <label class="control-label" for="input01">性格</label>
		            <div class="controls">
		               <select name="character" >

		               	<option value="内向" <if condition=" $userProfile['intro']['character'] eq '内向'">selected</if> >内向</option>
		               	<option value="外向" <if condition=" $userProfile['intro']['character'] eq '外向'">selected</if> >外向</option>
		               	<option value="中性" <if condition=" $userProfile['intro']['character'] eq '中性'">selected</if> >中性</option>
		               </select>
		               <div class="help"> <p>用于推荐改良性格的资料</p></div>
		            </div>
		          </div>

		          <div class="control-group">
		            <label class="control-label" for="input01">家庭情况</label>
		            <div class="controls">
		              <label class="multiple_input parent"><input type="radio" name="parents" <if condition=" $userProfile['intro']['parents'] eq 2 ">checked</if> value="2" />双亲</label>
		              <label class="multiple_input parent"><input type="radio" name="parents" <if condition=" $userProfile['intro']['parents'] eq 1 ">checked</if>  value="1"/>单亲</label>
		            </div>
		          </div>

		          <div class="control-group">
		            <label class="control-label" for="input01">我是孩子的</label>
		            <div class="controls">
		               <select name="parent_type" >
		               {:getRelationOption($userProfile['intro']['parent_type'])}
		               </select>
		               <div class="help"> <p>选择合适的身份以获得你需要的资料</p></div>
		            </div>
		          </div>

	  	          <div class="form-actions">
		            <button type="submit" class="btn btn-primary">保存</button>
		          </div>
          	  </div>

	          <em class="bottom_line"></em>
	        </fieldset>


        </form>
	</section>
	<!-- content end -->

<include file="__THEME__/footer" />